package xyz.kongbai.shopseckill.scheduled;

import lombok.extern.slf4j.Slf4j;
import org.springframework.scheduling.annotation.Async;
import org.springframework.scheduling.annotation.EnableAsync;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

@Component
//@EnableScheduling
//@EnableAsync // 异步功能
@Slf4j
public class HelloSchedule {

//    @Async //希望异步执行的方法
//    @Scheduled(cron = "*/5 * * * * ?")
    public void hello(){
        log.info("hello...");
    }
}
